<el-drawer
    title="管理员管理"
    :visible.sync="create.drawer"
    direction="rtl"
    size="530px"
    custom-class="Va-drawer fixed"
    {{--  监测抽屉鼠标事件  --}}
    :wrapper-closable="mousedownClassBol"
    @mousedown.native="handleWrapperMousedown($event)"
    @mouseup.native="handleWrapperMouseup($event)"
    {{--  监测抽屉鼠标事件 End  --}}
    v-cloak data-7512a93d
>
    <div>
        <el-row :gutter="24" type="flex" class="Va-drawer-main" :style="layouts.drawerFixedHeight" data-7512a93d>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                <el-form ref="create.model" :model="create.model" :rules="create.rules" label-position="top" size="medium" class="Va-forms" data-7512a93d>
                    <el-form-item label="所属角色" required prop="role_id" whole>
                        <el-select v-model="create.model.role_id" placeholder="-- 按归属角色搜索 --" style="width: 100%" :disabled="create.model.is_system==1">
                            <el-option v-for="(item, index) in parentsRoleItems" :key="index" :label="item.label" :value="item.value"></el-option>
                        </el-select>
                    </el-form-item>

                    <el-form-item label="用户名" required prop="name">
                        <el-input v-model="create.model.name" placeholder="请填写用户名" maxlength="20" show-word-limit></el-input>
                    </el-form-item>

                    <el-form-item label="登录账号" required prop="account">
                        <el-input v-model="create.model.account" placeholder="请填写登录账号" :min="5" maxlength="20" show-word-limit></el-input>
                        <span data-7512a93d class="Va-help-block" v-if="!create.model.id">
                            <i class="fa fa-exclamation-circle"></i> 5 ~ 20位字符，账号格式支持中文，英文，数字，下划线
                        </span>
                    </el-form-item>

                    <el-form-item label="登录密码" prop="password">
                        <el-input v-model="create.model.password" placeholder="请填写登录密码" maxlength="20" show-word-limit show-password
                                  :disabled="!updatePasswordStatus"></el-input>
                        <span data-7512a93d class="Va-help-block" v-if="create.model.id">
                            <i class="fa fa-exclamation-circle"></i>如需修改密码，请点击
                            <el-link type="warning" @click="updatePasswordStatus = !updatePasswordStatus">@{{ !updatePasswordStatus ? '修改密码' :'取消修改'}}</el-link>
                        </span>
                    </el-form-item>

                    <el-form-item label="角色状态" prop="status">
                        <el-switch v-model="create.model.status" active-text="开启" inactive-text="关闭"></el-switch>
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>
        <div slot="footer" class="Va-drawer-footer" data-7512a93d>
            <div class="Va-text-left" data-7512a93d>
                <el-button @click="drawerFormsSubmits('create')" type="primary" size="medium" :loading="create.loading">
                    @{{create.loading ? '提交中...' : '提 交'}}
                </el-button>
                <el-button @click="drawerFormsCloses('create')" size="medium">取 消</el-button>
            </div>
        </div>
    </div>
</el-drawer>

